<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Veh_misc_delete extends Page
{
       public $hfForm = null;
       public $hfType = null;
       public $hiddenMisc = null;
       public $hiddenWO = null;
       public $hiddenVeh = null;
       function Veh_misc_deleteCreate($sender, $params)
       {
       $veh = $_GET['veh'];
       $WO = $_GET['WO'];
       $misc = $_GET['misc'];
       $type = $_GET['type'];
       $form = $_GET['form'];
       $this->hfType->setValue($type);
       $this->hfForm->setValue($form);
       $this->hiddenVeh->setValue($veh);
       $this->hiddenWO->setValue($WO);
       $this->hiddenMisc->setValue($misc);

       $result = mysql_query("delete from veh_misc_tbl where misc_id='".$this->hiddenMisc->getValue()."'")
       or die(mysql_error());
       redirect('veh_misc_list.php?form='.$this->hfForm->getValue().'&type='.$this->hfType->getValue().'&veh='.$this->hiddenVeh->getValue().'&WO='.$this->hiddenWO->getValue().'&misc='.$this->hiddenMisc->getValue());


       }

}

global $application;

global $Veh_misc_delete;

//Creates the form
$Veh_misc_delete=new Veh_misc_delete($application);

//Read from resource file
$Veh_misc_delete->loadResource(__FILE__);

//Shows the form
$Veh_misc_delete->show();

?>